from django.views.generic.simple import direct_to_template
from contact.contact_form import ContactForm

def index(request):
    title_page = 'Tractament'
    
    if request.method == 'GET': # If the form has been submitted...
        form = ContactForm({'subject' : '[web algos] Formulari de tractament'}) # An unbound form

    return direct_to_template(request, 'tractament/index.html'
                              , {'title_page' : title_page ,
                                 'form' : form,
                                 'form_subject': '[web algos] Formulari de tractament'} )